package com.baizhi.service.Impl;

import com.baizhi.dao.BrandDao;
import com.baizhi.Brand;
import com.baizhi.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BrandServiceImpl implements BrandService {
    @Autowired
    private BrandDao bd;
    @Override
    public List<Brand> selectBrand() {
        List<Brand> brands = bd.selectBrand();
        return brands;
    }

    @Override
    public List<Brand> selectProduct() {
        List<Brand> brands = bd.selectList(null);
        return brands;
    }

    @Override
    public void insertBrand(Brand brand) {
        int insert = bd.insert(brand);
    }

    @Override
    public void delete(int id) {
    bd.deleteById(id);
    }
}
